import 'package:flutter_shop/pages/common/common_input_page/entity/common_input_data.dart';

commonInputDataFromJson(CommonInputData data, Map<String, dynamic> json) {
	if (json['title'] != null) {
		data.title = json['title']?.toString();
	}
	if (json['content'] != null) {
		data.content = json['content']?.toString();
	}
	if (json['hintText'] != null) {
		data.hintText = json['hintText']?.toString();
	}
	if (json['maxLength'] != null) {
		data.maxLength = json['maxLength']?.toInt();
	}
	if (json['inputType'] != null) {
		data.inputType = json['inputType']?.toString();
	}
	return data;
}

Map<String, dynamic> commonInputDataToJson(CommonInputData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['title'] = entity.title;
	data['content'] = entity.content;
	data['hintText'] = entity.hintText;
	data['maxLength'] = entity.maxLength;
	data['inputType'] = entity.inputType;
	return data;
}